package com.zhkj.shixi.tvplayer.util;

import java.io.File;
import java.util.ArrayList;
import java.util.List;

/**
 * Created by chenhao on 19-8-9.
 */

public class FileOpera {
    /**
     * 获取文件同级目录下所有文件,不包括文件夹
     * @param url
     * @return
     */
    public static List<File> getFileList(String url){
        File f =new File(url);
        f =f.getParentFile();
        File [] files = f.listFiles();
        List<File> fileList =new ArrayList<File>();
        for (File file:files){
            if (file.isFile()){
                fileList.add(file);
            }
        }
        return fileList;
    }

    
}
